home *** CD-ROM | disk | FTP | other *** search
- /* Manual */
-
- options results
- parse ARG Port Ptr M0 M1 M2 M3 M4 M5 M6 b
-
- ADDRESS value Port
-
- pp_GetWidth
- W=result;W2=W/2-1
-
- if W=0 then EXIT
-
- pp_GetHeight
- H=result;H2=H/2-1
-
- IF Ptr=1|Ptr=2|Ptr=22 then DO
- IF M0=1|M0=2|M0=22 THEN DO
- X=M1;Y=M2;R=M3
- END
- ELSE
- DO
- X=W2
- Y=H2
- IF W>H THEN DO
- R=H2
- END
- ELSE
- DO
- R=W2
- END
- END
-
- pp_DialogInit 150 100 "*Circle*" 3
- pp_Integer 0 60 5 50 16 "X" 1 X
- pp_Integer 1 60 25 50 16 "Y" 1 Y
- pp_Integer 2 60 50 50 16 "Radius" 1 R
- pp_Dialog
- rc=result
- if rc=0 then
- do
- EXIT
- end
-
- pp_UpdateUndo
-
- pp_GetDialog 0
- X=result
-
- pp_GetDialog 1
- Y=result
-
- pp_GetDialog 2
- R=result
-
- if Ptr=1 then DO
- pp_Circle X Y R
- END
- ELSE
- DO
- pp_CircleF X Y R
- END
- END
-
- IF Ptr=14 then DO
- pp_AvoidRefresh
- IF M0=14 THEN DO
- X=M1;Y=M2
- END
- ELSE
- DO
- X=W2
- Y=H2
- END
-
- pp_DialogInit 150 75 "*Text*" 2
- pp_Integer 0 60 5 50 16 "X" 1 X
- pp_Integer 1 60 25 50 16 "Y" 1 Y
- pp_Dialog
- rc=result
- if rc=0 then
- do
- pp_PermitRefresh
- EXIT
- end
-
- pp_UpdateUndo
-
- pp_GetDialog 0
- X=result
-
- pp_GetDialog 1
- Y=result
-
- pp_TextDraw X Y
- pp_PermitRefresh
-
- END
-
- IF Ptr=12|Ptr=13|Ptr=25 then DO
- IF M0=12|M0=13|M0=25 THEN DO
- X=M1;Y=M2;R=M3;R2=M4
- END
- ELSE
- DO
- X=W2
- Y=H2
- R=W2
- R2=H2
- END
-
- pp_DialogInit 150 125 "*Ellipse*" 4
- pp_Integer 0 60 5 50 16 "X" 1 X
- pp_Integer 1 60 25 50 16 "Y" 1 Y
- pp_Integer 2 60 50 50 16 "RadiusX" 1 R
- pp_Integer 3 60 70 50 16 "RadiusY" 1 R2
- pp_Dialog
- rc=result
- if rc=0 then
- do
- EXIT
- end
-
- pp_UpdateUndo
-
- pp_GetDialog 0
- X=result
-
- pp_GetDialog 1
- Y=result
-
- pp_GetDialog 2
- R=result
-
- pp_GetDialog 3
- R2=result
-
- if Ptr=12 then DO
- pp_Ellipse X Y R R2
- END
- ELSE
- DO
- pp_EllipseF X Y R R2
- END
- END
-
- IF Ptr=3|Ptr=4|Ptr=21 then DO
- IF M0=3|M0=4|M0=21 THEN DO
- X=M1;Y=M2;XX=M3;YY=M4
- END
- ELSE
- DO
- X=0
- Y=0
- XX=W-1
- YY=H-1
- END
-
- DO UNTIL rc>-1
-
- pp_DialogInit 150 155 "*Box*" 5
- pp_Integer 0 60 5 50 16 "Start*X" 1 X
- pp_Integer 1 60 25 50 16 "Start*Y" 1 Y
- pp_Integer 2 60 50 50 16 "End*X" 1 XX
- pp_Integer 3 60 70 50 16 "End*Y" 1 YY
- pp_Button 4 60 100 50 16 'Reset'
- pp_Dialog
- rc=result
-
- IF rc=-4 THEN DO
- X=0
- Y=0
- XX=W-1
- YY=H-1
- END
-
- END
-
- IF rc=0 then DO
- EXIT
- END
-
- pp_UpdateUndo
-
- pp_GetDialog 0
- X=result
-
- pp_GetDialog 1
- Y=result
-
- pp_GetDialog 2
- XX=result
-
- pp_GetDialog 3
- YY=result
-
- if Ptr=3 then DO
- pp_Box X Y XX YY
- END
- ELSE
- DO
- pp_BoxF X Y XX YY
- END
- END
-
- IF Ptr=6|Ptr=7|Ptr=24 then DO
- IF M0=6|M0=7|M0=24 THEN DO
- X=M1;Y=M2;XX=M3;YY=M4;XXX=M5;YYY=M6
- END
- ELSE
- DO
- X=0
- Y=0
- XX=W-1
- YY=0
- XXX=W2
- YYY=H-1
- END
-
- pp_DialogInit 150 175 "*Spline*" 6
- pp_Integer 0 60 5 50 16 "Start*X" 1 X
- pp_Integer 1 60 25 50 16 "Start*Y" 1 Y
- pp_Integer 2 60 50 50 16 "End*X" 1 XX
- pp_Integer 3 60 70 50 16 "End*Y" 1 YY
- pp_Integer 4 60 95 50 16 "MX" 1 XXX
- pp_Integer 5 60 115 50 16 "MY" 1 YYY
- pp_Dialog
- rc=result
- if rc=0 then
- do
- EXIT
- end
-
- pp_UpdateUndo
-
- pp_GetDialog 0
- X=result
-
- pp_GetDialog 1
- Y=result
-
- pp_GetDialog 2
- XX=result
-
- pp_GetDialog 3
- YY=result
-
- pp_GetDialog 4
- XXX=result
-
- pp_GetDialog 5
- YYY=result
-
- if Ptr=6 then DO
- pp_Spline X Y XX YY XXX YYY
- END
- ELSE
- DO
- pp_SplineF X Y XX YY XXX YYY
- END
- END
-
- IF Ptr=5|Ptr=20 then DO
- IF M0=5|M0=20 THEN DO
- X=M1;Y=M2;XX=M3;YY=M4
- END
- ELSE
- DO
- X=0
- Y=0
- XX=W-1
- YY=H-1
- END
-
- pp_DialogInit 150 125 "*Line*" 4
- pp_Integer 0 60 5 50 16 "Start*X" 1 X
- pp_Integer 1 60 25 50 16 "Start*Y" 1 Y
- pp_Integer 2 60 50 50 16 "End*X" 1 XX
- pp_Integer 3 60 70 50 16 "End*Y" 1 YY
- pp_Dialog
- rc=result
- if rc=0 then
- do
- EXIT
- end
-
- pp_UpdateUndo
-
- pp_GetDialog 0
- X=result
-
- pp_GetDialog 1
- Y=result
-
- pp_GetDialog 2
- XX=result
-
- pp_GetDialog 3
- YY=result
-
- pp_Line X Y XX YY
- END
-
- IF Ptr=15|Ptr=16 then DO
- pp_DialogInit 150 75 "*Polygon*" 2
- pp_Integer 0 60 5 50 16 "Shift*X" 1 0
- pp_Integer 1 60 25 50 16 "Shift*Y" 1 0
- pp_Dialog
- rc=result
- if rc=0 then
- do
- EXIT
- end
-
- pp_UpdateUndo
-
- pp_GetDialog 0
- xx=result
-
- pp_GetDialog 1
- yy=result
-
- file="Ram:T/ppdata"
- IF OPEN("g",file, "read") then
- DO
- tind = READLN("g")
- pp_StartPoly
- DO i=1 to tind
- x=READLN("g")+xx
- y=READLN("g")+yy
- pp_AddPoly x y
- END
-
- IF Ptr=15 then DO
- pp_EndPoly
- END
- ELSE
- DO
- pp_EndPolyF
- END
- call close(file)
- END
- END
-
- IF Ptr=17|Ptr=18 then DO
- pp_DialogInit 150 75 "*Bezier*" 2
- pp_Integer 0 60 5 50 16 "Shift*X" 1 0
- pp_Integer 1 60 25 50 16 "Shift*Y" 1 0
- pp_Dialog
- rc=result
- if rc=0 then
- do
- EXIT
- end
-
- pp_UpdateUndo
-
- pp_GetDialog 0
- xx=result
-
- pp_GetDialog 1
- yy=result
-
- file="Ram:T/ppdata"
- IF OPEN("g",file, "read") then
- DO
- tind = READLN("g")
- pp_StartPoly
- DO i=1 to tind
- x=READLN("g")+xx
- y=READLN("g")+yy
- pp_AddPoly x y
- END
- IF Ptr=17 then DO
- pp_EndPolyS
- END
- ELSE
- DO
- pp_EndPolySF
- END
- call close(file)
- END
- END
-
- IF Ptr=9 then DO
- pp_DialogInit 150 75 "*Draw*Point*" 2
- pp_Integer 0 60 5 50 16 "Shift*X" 1 0
- pp_Integer 1 60 25 50 16 "Shift*Y" 1 0
- pp_Dialog
- rc=result
- if rc=0 then
- do
- EXIT
- end
-
- pp_UpdateUndo
-
- pp_GetDialog 0
- xx=result
-
- pp_GetDialog 1
- yy=result
-
- file="Ram:T/ppdata"
- IF OPEN("g",file, "read") then
- DO
- tind = READLN("g")
- pp_StartPoly
- DO i=1 to tind
- x=READLN("g")+xx
- y=READLN("g")+yy
- pp_AddPoly x y
- END
- pp_EndPoint
- call close(file)
- END
- END
-
- IF Ptr=10|Ptr=11|Ptr=23 then DO
- pp_DialogInit 150 75 "*Free*Draw*" 2
- pp_Integer 0 60 5 50 16 "Shift*X" 1 0
- pp_Integer 1 60 25 50 16 "Shift*Y" 1 0
- pp_Dialog
- rc=result
- if rc=0 then
- do
- EXIT
- end
-
- pp_UpdateUndo
-
- pp_GetDialog 0
- xx=result
-
- pp_GetDialog 1
- yy=result
-
- file="Ram:T/ppdata"
- IF OPEN("g",file, "read") then
- DO
- tind = READLN("g")
- pp_StartPoly
- DO i=1 to tind
- x=READLN("g")+xx
- y=READLN("g")+yy
- pp_AddPoly x y
- END
- IF Ptr=10 then DO
- pp_EndPointL
- END
- ELSE
- DO
- pp_EndPointLF
- END
- call close(file)
- END
- END
-
-
-
-